package org.omg.RTCORBA.RTORBPackage;

/**
 * Generated from IDL definition of exception "MutexNotFound"
 * 
 * @author orbas IDL compiler
 */

public final class MutexNotFoundHelper {
	private static org.omg.CORBA.TypeCode _type = null;

	public static org.omg.CORBA.TypeCode type() {
		if (_type == null) {
			_type = org.omg.CORBA.ORB.init().create_exception_tc(
					org.omg.RTCORBA.RTORBPackage.MutexNotFoundHelper.id(),
					"MutexNotFound", new org.omg.CORBA.StructMember[0]);
		}
		return _type;
	}

	public static void insert(final org.omg.CORBA.Any any,
			final org.omg.RTCORBA.RTORBPackage.MutexNotFound s) {
		org.omg.CORBA.portable.OutputStream out = any.create_output_stream();
		any.type(type());
		write(out, s);
		any.read_value(out.create_input_stream(), type());
	}

	public static org.omg.RTCORBA.RTORBPackage.MutexNotFound extract(
			final org.omg.CORBA.Any any) {
		return read(any.create_input_stream());
	}

	public static String id() {
		return "IDL:org/omg/RTCORBA/RTORB/MutexNotFound:1.0";
	}

	public static org.omg.RTCORBA.RTORBPackage.MutexNotFound read(
			final org.omg.CORBA.portable.InputStream in) {
		org.omg.RTCORBA.RTORBPackage.MutexNotFound result = new org.omg.RTCORBA.RTORBPackage.MutexNotFound();
		if (!in.read_string().equals(id()))
			throw new org.omg.CORBA.MARSHAL("wrong id");
		return result;
	}

	public static void write(final org.omg.CORBA.portable.OutputStream out,
			final org.omg.RTCORBA.RTORBPackage.MutexNotFound s) {
		out.write_string(id());
	}
}
